<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>DIY自选配置 - DIY装机大师 - 佳恒科技</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<meta content="MSHTML 6.00.2900.5921" name="GENERATOR" />
		<link href="<%=basePath%>/style/common.css" type="text/css"
			rel="stylesheet" />
		<link href="<%=basePath%>/style/zxpz.css" type="text/css"
			rel="stylesheet" />
		<link href="<%=basePath%>/style/pagination.css" type="text/css"
			rel="stylesheet" />
		<script type="text/javascript"
			src="<%=basePath%>/script/jquery1.3.2.js"></script>
		<script language="javascript"
			src="<%=basePath%>/script/jquery.pagination.js"
			type="text/javascript"></script>
		<script language="javascript"
			src="<%=basePath%>/script/jquery.form.js" type="text/javascript"></script>
		<script language="javascript" src="<%=basePath%>/script/diy.js"
			type="text/javascript"></script>
		<style>
.saveDiyForm {
	BORDER-RIGHT: blue 2px solid;
	PADDING-RIGHT: 2px;
	BORDER-TOP: blue 2px solid;
	PADDING-LEFT: 2px;
	BACKGROUND: #fff;
	PADDING-BOTTOM: 2px;
	BORDER-LEFT: blue 2px solid;
	PADDING-TOP: 2px;
	BORDER-BOTTOM: blue 2px solid
}

.saveDiyForm td {
	HEIGHT: 20px
}
</style>
		<script type="text/javascript">
			function getProducts(id)
			{
				$("#selector").html("<img alt='Loading...' src='<%=basePath%>/images/loading.gif'></img>内容加载中...");
				$("#sortId").val(id);
				$("#pj_sort_form").ajaxSubmit({success : function(data) {
					$("#selector").html(data);
					//$("html, body").animate({scrollTop:0}, "slow");
				}});
			}
			$(function(){
				$(".pzList:a:eq(0)").addClass("curr");
				/* 分页插件Pagination */
				var _total_num = $("#total").val();
				var _sort_id = $("#sortId").val();
				$("#pagination").pagination(_total_num, {
							items_per_page : 13,
							callback : pageselectCallback
						});
				function pageselectCallback(page_index, jq) {
					$.ajax({
								type : "POST",
								dataType : "html",
								url : "<%=basePath%>/product/msort",
								data : {
									id: _sort_id,
									page_index : page_index,
									maxResult : 13
								},
								success : function(data) {
									$("#selector").html(data);
								}
							});
				}
			})
		</script>
	</head>
	<body>
		<div class="Main">
			<!--[if !ie]>正文左侧开始<![endif]-->
			<div class="left">
				<div class="pzd_t">
					<img height="88" src="<%=basePath%>/images/column_bgt_zjpzd.gif"
						width="426" />
				</div>
				<div class="pzd_c">
					<div class="pzdList_wrap">
						<div class="pzdList_thead">
							<table cellspacing="0" cellpadding="0" width="100%" border="0">
								<tbody>
									<tr>
										<td class="first" width="60">
											id
										</td>
										<td>
											名称
										</td>
										<td width="126">
											LOGO
										</td>
										<td width="54">
											修改
										</td>
										<td width="45">
											删除
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<s:iterator id="s" value="sortList">
							<div class="pzdList_td">
								<table cellspacing="0" cellpadding="0" width="100%" border="0">
									<tbody>
										<tr>
											<td class="first" width="60">
												${s.id }
											</td>
											<td class="align_Left">
												${s.name }
											</td>
											<td width="126">
												<img src="<%=basePath%>/images/${s.icon }" WIDTH="126"
													HEIGHT="39" />
											</td>
											<td width="54">
												修改
											</td>
											<td width="45">
												删除
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</s:iterator>
					</div>
				</div>
				<div class="pzd_b"></div>
			</div>
			<!--[if !ie]>正文左侧结束<![endif]-->
			<!--[if !ie]>正文右侧开始<![endif]-->
			<div class="right">
				<ul class="pzList">
					<s:iterator id="s" value="sortList">
						<li>
							<a onclick="getProducts(${s.id })" href="javascript:void()">${s.name
								}</a>
						</li>
					</s:iterator>
				</ul>
				<!-- 页面 -->
				<form id="pj_sort_form" action="<%=basePath%>/product/sort"
					method="post">
					<input id="total" type="hidden" value="${total }" />
					<input id="sortId" name="id" type="hidden" value="${id }" />
				</form>
				<div id="selector">
					<img alt="Loading..." src="<%=basePath%>/images/loading.gif"></img>
					内容加载中...
				</div>
				<div id="pagination" class="pagination paging"></div>
			</div>
			<!--[if !ie]>正文右侧结束<![endif]-->
			<div class="clear"></div>
		</div>
	</body>
</html>
